/*
*

	@author: taco
	@Date: 2022/6/6
	@Time: 15:30

*
*/
package utils

import (
	"encoding/base64"
)

func Encode(input []byte) string {
	return base64.StdEncoding.EncodeToString(input)
}

func Decode(encodeString string) ([]byte, error) {
	decodeBytes, err := base64.StdEncoding.DecodeString(encodeString)
	if err != nil {
		return nil, err
	}
	return decodeBytes, nil

}
